import 'package:dailoz/constants.dart';
import 'package:dailoz/size_config.dart';
import 'package:flutter/material.dart';

class DayTask extends StatelessWidget {
  const DayTask({
    Key? key,
    required this.taskWidgetList,
    required this.time,
  }) : super(key: key);

  final List<Widget>? taskWidgetList;
  final String? time;

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: <Widget>[
        Divider(
          thickness: SizeConfig.getProportionateScreenHeight(1.0),
        ),
        SizedBox(
          height: SizeConfig.getProportionateScreenHeight(10.0),
        ),
        Text(
          time!.length == 2 ? '$time:00' : time!,
          style: TextStyle(
            fontSize: SizeConfig.getProportionateFontSize(14.0),
            color: bottomTextButtonColor,
            fontWeight: FontWeight.bold,
          ),
        ),
        SizedBox(
          height: SizeConfig.getProportionateScreenHeight(10.0),
        ),
        SingleChildScrollView(
          scrollDirection: Axis.horizontal,
          child: Row(
            children: <Widget>[
              Row(
                children: taskWidgetList!,
              )
            ],
          ),
        ),
        SizedBox(
          height: SizeConfig.getProportionateScreenHeight(10.0),
        )
      ],
    );
  }
}
